/* GUI CONVERTED from mgurmta.i (converter v1.75) Sun Aug 13 17:20:22 2000 */
/* mgurmta.i - USER MASTER MAINTENANCE INCLUDE PROCESS USR_GROUPS         */
/* Copyright 1986-2000 QAD Inc., Carpinteria, CA, USA.                    */
/* All rights reserved worldwide.  This is an unpublished work.           */
/*F0PN*/ /*V8:ConvertMode=Maintenance                                     */
/* REVISION:  7.5     LAST MODIFIED: 09/26/94   BY: MWD  *J034*           */
/* REVISION:  9.1     LAST MODIFIED: 08/13/00   BY: *N0KR* myb            */
/**************************************************************************/
/*        REFORMAT 288-CHARACTER USR_GROUPS INTO 4 72-CHAR LINES          */
/*        NOTE: CODED TO BE CONSISTENT WITH MGPWMT.P                      */
/* USED IN MGURMT.P AND MGURMTP.P AND MGURIQ.P                            */
/**************************************************************************/


         if grps > "" then repeat:
            iloc = index(grps,",").
            if iloc = 0 and grps > "" then
               iloc = length(grps) + 1.
            if iloc = 0 then leave.

            agrp = substring(grps,1,iloc - 1).

            if agrp > "" then do:
           if length(canrun[i]) + length(agrp) +
            (if length(canrun[i]) > 0 then 1 else 0) > 72
               then do:
                  if i >= 4 then leave.
                  i = i + 1.
               end.
               if canrun[i] > "" then
                  canrun[i] = canrun[i] + ",".
               canrun[i] = canrun[i] + agrp.
            end.  /* IF AGRP > "" THEN DO */

            grps = substring(grps,iloc + 1).
         end. /* IF GRPS > "" THEN REPEAT */
